# -*- coding:utf8 -*- #
# -----------------------------------------------------------------------------------
# ProjectName:  smart-meter-iot-test
# FileName:     thread_job.py
# Author  :     
# Datetime:     2022/8/31 10:15
# Description：
# -----------------------------------------------------------------------------------
from threading import Thread

from common.util.logUtil.logUtil import LoggerUtil

logger = LoggerUtil()


def thread_job(job_func, *agrs):
    try:
        job_thread = Thread(target=job_func, args=agrs)
        job_thread.setDaemon(True)
        job_thread.start()
    except Exception as e:
        logger.error(e)
        raise e


def thread_job1(job_func, agrs):
    try:
        job_thread = Thread(target=job_func, args=agrs)
        # job_thread.setDaemon(True)
        job_thread.start()
    except Exception as e:
        logger.error(e)
        raise e


if __name__ == '__main__':
    pass
